$(function(){
	$('#submit').click(function(){
		var name = $("#id").val();
		var password = $("#password").val();
		if(name=="" || password==""){
			alert("用户名或密码不能为空！");
			return false;
		}else{
			$.ajax({
				type: "POST",
				url: "/gaolk",
				dataType: 'json',
				data: {name:name,pass:password},
				success: function(msg){

					if(msg.success==1){
						window.location.href='/mycenter';
					}else{
						alert('登陆失败，请重新输入账户密码!')
					}
				}
			});

		}
	})
})





